const { DataTypes } = require('sequelize')
const sequelize = require('./db')

const Notices = sequelize.define(
  'Notice',
  {
    time: {
      type: DataTypes.DATE,
      allowNull: false,
      defaultValue: DataTypes.NOW,
      comment: '公告时间',
    },
    content: {
      type: DataTypes.TEXT,
      allowNull: false,
      comment: '公告内容',
    },
  },
  {
    tableName: 'Notices',
    timestamps: false,
    comment: '公告表',
  }
)

module.exports = Notices
